#include <graphics.h>

#include <iostream>

int main()
{
	//printf("%ws",GetEasyXVer());
	initgraph(640, 480); // Initialize the graphics window with a width of 640 and height of 480

	int x = 320;
	int y = 240;

	BeginBatchDraw(); // Start batch drawing
	

	while (true)
	{
		ExMessage msg;
		while (peekmessage(&msg)) 
		{
			if (msg.message==WM_MOUSEMOVE) 
			{
				x = msg.x; // Update x coordinate with mouse position
				y = msg.y; // Update y coordinate with mouse position
			}
		}

		cleardevice(); // Clear the screen
		solidcircle(x, y, 100); // Draw a solid circle at (320, 240) with a radius of 100
		FlushBatchDraw(); // Flush the batch drawing to the screen
	}

	EndBatchDraw(); // End batch drawing

	return 0;
}